home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-08-26 | 17.0 KB | 930 lines | [TEXT/MACA] |
- Using the MacAPL Quick Reference:
-
- By typing an APL symbol, the text will automatically scroll to the
- appropriate definition within the text. If the bell rings when you
- press a key, there is no definition in the text for that symbol. To
- see which symbols are on which keys, use the Key Caps desk accessory.
-
- Scroll from here to see more information.
-
-
- Navigation shortcuts - type a letter to see the corresponding topic:
-
- Space goes to the beginning of the file.
- k Key Caps accessory
- q Quadnames
- f List of system functions
- v List of system variables
- n Numeric constants
- s Symbol name rules
- c Customizing the reference text
-
-
- These features are unimplemented in version 1.12: Combination, Decode,
- Drop, Dyadic Format, Transpose, Encode, Factorial, Inner Product,
- Logarithm, Outer Product, Reduction (except on vectors), Residue,
- Reverse, Rotate, Take, Scan, ┬COPY, ┬CR, ┬EX, ┬FX, ┬LOAD, ┬NL, ┬PCOPY,
- ┬PR, ┬PW, ┬SAVE, ┬STOP, ┬TRACE, ┬VR, ┬XLOAD, Copy command, Expunge
- command, and the first dimension variations of Compression, Catenate,
- Expansion, Reduction, Reverse, Rotate, Scan.
-
-
- key caps desk accessory:
-
- This accessory can be very useful in helping you locate the APL symbols.
- When you select "Key Caps" from the apple menu, a keyboard will appear.
- A "Key Caps" menu also appears. Select "APL" from the "Key Caps" menu.
- From now on if you hold down the Shift and/or Option keys, the keyboard
- will display the corresponding APL symbols. You can leave this window
- on the desktop while you work in other windows, as it operates even
- when it is not the frontmost window.
-
-
-
-
- numeric constants:
-
- Numbers are formed from the digits "0" through "9". The period "."
- is used as a decimal point. The negative sign is "¬", which is typed
- as Option-2. It can be distinguished from the hyphen "-" and the
- underline "_" by its raised position. The hyphen is used for negation
- and subtraction and isn't part of a numeric constant. Scientific
- notation is permitted and consists of a number followed by "E" or "e"
- and then a power of 10.
-
- Examples: 1234 12. .34 2.34 ¬2.5 0.0 ¬12 1E7 1.23e¬5
-
-
-
- symbol name rules:
-
- The following characters may be used within a symbol name: "A" through
- "Z", "a" through "z", the delta "·", the locked delta "∩", and digits
- "0" through "9". The symbol name must not start with a digit.
-
- If one or more locked deltas appears in a name, the object is locked
- and invisible but can still be referenced by the name.
-
- System variables and functions have distinguished names which begin with
- the quad "┬" character. You cannot define names which contain the quad.
-
-
-
-
-
- customizing this reference text:
-
- You can customize this reference information by editing the file with
- an editor. Save it as text only. Don't use tabs and don't let it get
- longer than 32K. Any lines you add must be blank or start with a space.
- You can make APL use a different reference file by holding down the
- Option key while choosing "APL Reference..." from the menu. A dialog
- box appears allowing you to specify a different file. APL remembers to
- use the new file until it is deleted or moved or you change it again.
-
-
-
-
- + Plus sign
-
- +B Identity. B is unchanged.
-
- A+B Addition. A is added to B. A and B must be numeric.
-
-
-
- - Hyphen
-
- -B Negation. The sign of B is reversed. B must be numeric.
-
- A-B Subtraction. B is subtracted from A. A and B must be numeric.
-
-
-
- ╨ Multiplication sign
-
- ╨B Direction. If B is negative, ¬1 is returned. If positive, 1
- is returned. If zero, 0 is returned. B must be numeric.
-
- A╨B Multiplication. A is multiplied by B. A and B must be numeric.
-
-
- ¡ Division sign
-
- ¡B Reciprical. The reciprical of B is returned. B must be numeric.
-
- A¡B Division. A is divided by B. A and B must be numeric.
-
-
-
- * Asterisk
-
- *B Power of e. The number e is raised to the B power. B must be numeric.
-
- A*B Power. A is raised to the B power. A and B must be numeric.
-
-
-
- ╡ Vertical bar
-
- ╡B Absolute. The absolute value of B is returned.
-
- A╡B Residue. The amount leftover after evenly dividing A into B.
-
-
-
- º Ceiling
-
- ºB Ceiling. Next higher integer that is ñ B.
-
- AºB Maximum. Returns the larger of A or B.
-
-
-
- ╢ Floor
-
- ╢B Floor. Next lower integer that is ó B.
-
- A╢B Minimum. Returns the smaller of A or B.
-
-
-
- ╕ Logarithm sign
-
- ╕B Natural logarithm. Computes the base-e logarithm of B.
-
- A╕B Logarithm. Computes the base-A logarithm of B.
-
-
-
- ! Exclamation point
-
- !B Factorial. For integer B, the B factorial, else Gamma function of B.
-
- A!B Combination. The number of groups of B things taken A at a time.
-
-
-
- ┐ Circle function
-
- ┐B Pi times. B multiplied by pi is returned.
-
- A┐B Trancendental function. B is operated on according to A:
-
- ¬7┐B arctanh B
- ¬6┐B arccosh B
- ¬5┐B arcsinh B
- ¬4┐B (¬1+B*2)*.5
- ¬3┐B arctan B
- ¬2┐B arccos B
- ¬1┐B arcsin B
- 0┐B (1-B*2)*.5
- 1┐B sine B
- 2┐B cosine B
- 3┐B tangent B
- 4┐B (1+B*2)*.5
- 5┐B sinh B
- 6┐B cosh B
- 7┐B tanh B
-
-
- ? Question mark
-
- ?B Roll. Random integer from ^B.
-
- A?B Deal. A random integers selected from ^B without repetition.
-
-
-
- = Equal sign
-
- A=B Equals. 1 if the relation holds, 0 otherwise. A and B must be
- both character or both numeric.
-
-
-
-
- Ñ Not equal sign
-
- AÑB Not equal to. 1 if the relation holds, 0 otherwise.
- A and B must be both character or both numeric.
-
-
-
-
-
- < Less than sign
-
- A<B Less than. 1 if the relation holds, 0 otherwise.
- A and B must be numeric.
-
-
-
-
- ó Less than or equal to sign
-
- AóB Less than or equal to. 1 if the relation holds, 0 otherwise.
- A and B must be numeric.
-
-
-
-
- > Greater than sign
-
- A>B Greater than. 1 if the relation holds, 0 otherwise.
- A and B must be numeric.
-
-
-
-
- ñ Greater than or equal to sign
-
- AñB Greater than or equal to. 1 if the relation holds, 0 otherwise.
- A and B must be numeric.
-
-
-
-
- ╗ Or sign
-
- A╗B Or. Returns 1 if either A or B are 1, otherwise 0.
- A and B must hold values of 0 or 1.
-
-
-
-
- ╝ And sign
-
- A╝B And. Returns 1 if both A and B are 1, otherwise 0.
- A and B must hold values of 0 or 1.
-
-
-
-
- ß Nor sign
-
- AßB Nor. Returns 0 if either A or B are 0, otherwise 1.
- A and B must hold values of 0 or 1.
-
-
-
-
- Γ Nand sign
-
- AΓB Nand. Returns 0 if both A and B are 1, otherwise 1.
- A and B must hold values of 0 or 1.
-
-
-
-
- ½ Epsilon
-
- A½B Membership. Returns 1 if B is an element in scalar or vector A,
- 0 otherwise. Result is the same shape as B.
-
-
-
-
- á Tilde
-
- áB Not. Returns 1 if B=0, otherwise 0. B must be numeric with
- values of 1 or 0.
-
-
-
-
- í Equal underline can only be used as character data.
-
-
-
-
-
-
-
- ¿ Rho
-
- ¿B Shape. Returns numeric vector holding the dimensions of B.
-
- A¿B Reshape. Reorganize B to have the dimensions specified in A.
- Reuse elements in B as often as needed to make the result.
-
-
- , Comma
-
- ,B Ravel. Return B as a vector with all elements in order.
-
- A,B Catenate. Returns B appended to the right of A.
-
-
-
- ° Comma dash
-
- A°B First dimension concatinate.
- Same as "," but appends over the first dimension.
-
-
-
-
- ┤ Up arrow
-
- A┤B Take. Returns the first A elements of B (last if A is negative).
- Left arg is numeric vector with as many elements as rank of B.
-
-
-
-
- ¼ Down arrow
-
- A¼B Drop. Returns B without the first A elements (last if A is negative).
- Left arg is numeric vector with as many elements as rank of B.
-
-
-
-
- ^ Iota
-
- ^B Interval. Returns B consecutive integers starting from ┬IO value.
- B is a positive integer scalar.
-
- A^B Index.
- Returns positions in A where B is found, 1+^¿A if not found.
-
- » Iota underline can only be used as character data.
-
-
-
-
-
-
-
- / Slash
-
- A/B Compression. Squeeze out values of B where A is 0, keep where A is 1.
-
- ∙/B Reduction. ∙ is scalar dyadic function. Apply function between
- elements of B.
-
- └ Slash dash
-
- A└B First dimension compression. Same as / but works along 1st dimension
-
- ∙└B First dimension reduction. Same as └ but works along 1st dimension
-
-
-
- \ Backslash
-
- A\B Expansion. Keep element of B where A is 1, insert fill where A is 0
-
- ∙\B Scan. ∙ is scalar dyadic function. Each element of answer is result
- of applying ∙ between preceeding elements of B.
-
-
- ╚ Backslash dash
-
- A╚B First dimension expansion. Same as ╚ but along 1st dimension.
-
- ∙╚B First dimension scan. Same as ∙╚ but along 1st dimension.
-
-
-
- ≈ Circle bar
-
- ≈B Reverse. Reverse the order of the elements in B.
-
- A≈B Rotate. Take first A elements of B and move to the end.
- If A is negative, take last A elements.
-
-
- ╙ Circle dash
-
- ╙B First dimension reverse. Same as ≈ but along 1st dimension.
-
- A╙B First dimension rotate. Same as ≈ but along 1st dimension.
-
-
-
- ╒ Circle backslash
-
- ╒B Transpose. Invert matrix B along main diagonal.
-
- A╒B Generalized transpose. Transpose B according to ordering given
- in A. A is a permutation of ^¿¿B.
-
-
- ÷ Tee
-
- A÷B Encode. Representation of B in number system with radix A.
-
-
-
-
-
- ║ Inverted tee
-
- A║B Decode. Value of representation B in number system with radix A.
-
-
-
-
-
- ▒ Domino can only be used as character data.
-
-
-
-
-
-
-
- ╓ Thorn
-
- ╓B Format. Representation of B as a character matrix.
-
- A╓B Dyadic format. Format numbers in B according to pairs of elements
- in A. First element is field width, second is precision.
-
-
- ┼ Right cap can only be used as character data.
-
-
-
-
-
-
-
- σ Squish quad can only be used as character data.
-
-
-
-
-
-
-
- φ Del bar
-
- φB Grade down. Permutation which would put vector B in decending order.
- Ex. B[φB] will sort numeric vector B in decending order
-
-
-
-
- ε Delta bar
-
- εB Grade up. Permutation which would put vector B in ascending order.
- Ex. B[εB] will sort numeric vector B in ascending order
-
-
-
-
- │ Hydrant
-
- │B Execute. Execute character vector B as an APL expression.
- Ex. │'2+3' 2+│'3+4'
-
-
-
-
- ╜ Left cap can only be used as character data.
-
-
-
-
-
-
-
- ì Cap can only be used as character data.
-
-
-
-
-
-
-
- ├ Cup can only be used as character data.
-
-
-
-
-
-
-
- ╞ Jot
-
- A╞.∙B Outer product. ∙ is a scalar dyadic function. Form a table of
- combinations of A∙B. When A and B are vectors, result is matrix.
-
-
-
-
- . Period
-
- . Decimal point.
-
- A∙.∙B Inner Product. ∙ are scalar dyadic functions.
- Ex. A+.╨B yields matrix product of A and B
-
-
- ┴ Umlaut can only be used as character data.
-
-
-
-
-
-
-
- ╥ Left arrow
-
- A╥B Assignment. Gives symbol A the value in B. Can be embedded
- within a larger expression, such as 2+A╥B+3
-
-
-
-
- ╘ Right arrow
-
- ╘ Bare branch. Abandon execution of chain of called functions.
-
- ╘B Branch. Give control to line number B. If no such line, end
- the function. If empty vector, drop through to next line.
-
-
- ╟ Lamp
-
- ╟ Comment. All characters to right of ╟ to end of line or next ╟
- are ignored as a comment.
-
-
-
-
- ┘ Diamond can only be used as character data.
-
-
-
-
-
-
-
- ` Accent can only be used as character data.
-
-
-
-
-
-
-
- @ At sign can only be used as character data.
-
-
-
-
-
-
-
- # Number sign can only be used as character data.
-
-
-
-
-
-
-
- $ Dollar sign can only be used as character data.
-
-
-
-
-
-
-
- % Percent sign can only be used as character data.
-
-
-
-
-
-
-
- & Ampersand can only be used as character data.
-
-
-
-
-
-
-
- ( Left parenthesis
-
- Used for grouping in expressions to override the default right to left
- order of execution.
-
-
-
-
- ) Right parenthesis
-
- Used for grouping in expressions to override the default right to left
- order of execution.
-
-
-
-
- _ Underline can be used as character data, or as part of a symbol name.
-
-
-
-
-
-
-
- [ Left bracket
-
- Used for indexing arrays. For vector B, B[X] is the Xth element of B.
- First element in B is the ┬IOth element. For arrays, separate indexes
- of each dimension with semicolons. Ex. for matrix B, B[A;B] is element
- in row A column B. B[A;] specifies all columns in row A.
-
-
- ] Right bracket
-
- Used for indexing arrays. See [.
-
-
-
-
-
- { Left brace can only be used as character data.
-
-
-
-
-
-
-
- } Right brace can only be used as character data.
-
-
-
-
-
-
-
- ; Semicolon
-
- Used to separate indexes when indexing arrays. See [.
- Used to separate list elements. Ex. L╥(A;B) creates a two element
- list (nested array) with array A as 1st element, B as 2nd.
-
-
-
- : Colon
-
- Used to form line labels in functions. Label must be symbol to left of
- expression, followed by colon. Ex. LABEL:2+2 is valid. In function,
- label takes value of line number and can be used as branch target
- as in ╘LABEL
-
-
- ' Quote
-
- Used to create character constants. Ex. Name╥'Michael'
-
-
-
-
-
- " Double quote can only be used as character data.
-
- To create character constants use single quote (')
-
-
-
-
-
- ┌ Therefore can only be used as character data.
-
-
-
-
-
-
-
- ¬ Negative sign
-
- Used to left of number to indicate negative. Ex. ¬2 ¬3.14 3E¬12
-
-
-
-
-
- ▄ Pound sign can only be used as character data.
-
-
-
-
-
-
-
- ▌ Cent sign can only be used as character data.
-
-
-
-
-
-
-
- µ Trademark can only be used as character data.
-
-
-
-
-
-
-
- î Alpha can only be used as character data.
-
-
-
-
-
-
-
- ╖ Omega can only be used as character data.
-
-
-
-
-
-
-
- ü Registered can only be used as character data.
-
-
-
-
-
-
-
- δ Synonym can only be used as character data.
-
-
-
-
-
-
-
- · Delta
-
- Can be used as character data or as a character in a symbol name.
-
-
-
-
-
- ⌐ Del can only be used as character data.
-
-
-
-
-
-
-
- ∞ Locked del can only be used as character data.
-
-
-
-
-
-
-
- ∩ Locked delta
-
- Can be used as a character in a symbol name. If so used, the
- symbol automatically becomes hidden (name does not appear on lists).
-
-
-
-
- ╔ Left tack can only be used as character data.
-
-
-
-
-
-
-
- ╛ Right tack can only be used as character data.
-
-
-
-
-
-
-
- ⌡ I bar can only be used as character data.
-
-
-
-
-
-
-
- ∙ Bullseye can only be used as character data.
-
-
-
-
-
-
-
- ≡ Caret quad can only be used as character data.
-
-
-
-
-
-
-
- ≥ Jot quad can only be used as character data.
-
-
-
-
-
-
-
- « Backslash quad can only be used as character data.
-
-
-
-
-
-
-
- ± Quote quad
-
- ▓╥X displays value of X without going to the next line afterwards.
- X╥▓ obtains a line of text from the user and returns it to X.
-
-
-
-
- ┬ Quad
-
- A╥┬ Quad input. Prompt (see ┬SF) and get expression from user.
- Evaluated result of expression is passed to A.
-
- ┬╥A Quad output. Displays value of A on screen. Can be embedded in
- larger expressions to see intermediate results.
-
- Scroll to see information on system variables and functions.
-
- quadnames - System variables and functions
-
- variables - System variables
-
- ┬ALX Attention Latent Expression. Executed when execution interrupted.
- ┬AV Atomic Vector. Contains all characters in APL set in ε order.
- ┬CT Comparison Tolerance. Used to make very close numbers equal.
- ┬DM Diagnostic Message. Holds last error report.
- ┬ELX Exception Latent Expression. Executed when error occurs.
- ┬EN Error Number. Holds code number of last error.
- ┬IO Index Origin. Origin of ^, ε, φ, indexing
- ┬LC Line Counter. Vector of line numbers now in execution.
- ┬LX Latent Expression. Executed when workspace is loaded.
- ┬NLT National Language Translation. 'ENGLISH'
- ┬PP Printing Precision. Default precision for displaying numbers.
- ┬PR Prompt Replacement. Character returned as ▓ prompt value.
- ┬PW Page Width. Lines are wrapped to this width.
- ┬RL Random Link. Controls random number generation (? functions)
- ┬SF Evaluated Input Prompt. String issued during ┬ prompt.
- ┬SI State Indicator. Shows functions and lines now in execution.
- ┬TS Time Stamp. 7 numbers holding date, time, and day
- ┬TT Terminal Type. 60=Macintosh
- ┬UL User Load. Number of workspaces now open.
- ┬VERSION Interpreter Version. Version, edit, serial
- ┬WA Workspace Available. Max amount of free memory.
-
-
- functions - System functions
-
- R╥A ┬COPY B Copy Objects named in B from Workspace named in A
- R╥┬CR B Canonical Representation of function named in B
- R╥┬DL B Delay Execution for B seconds
- R╥A ┬EDIT B Edit char vector B in window with title char vector A
- R╥┬EX B Expunge (erase) object named in B
- R╥┬FX B Fix Function from canonical representation B
- R╥┬HIDE B Hide object named in B (name won't appear in lists)
- R╥┬LOAD B Load Workspace named in B
- R╥┬LOCK B Lock object named in B (can't edit or change value)
- R╥┬MAC B Call Macintosh 68000 with machine code B, D0 yielding result
- R╥┬NC B Name Classification of object named in B
- R╥┬NL B Name List of class number B
- R╥A ┬PCOPY B Protected Copy objects A from workspace B
- ┬RESET Reset State Indicator
- R╥┬SAVE B Save Workspace according to B
- R╥A ┬STOP B Set Stop Vector on lines A of function named in B
- R╥A ┬TRACE B Set Trace Vector on lines A of function named in B
- R╥┬VR B Vector Representation of function named in B
- R╥┬XLOAD B ┬LOAD Without Executing Latent Expression
-
- -- End of reference text --